<html>
<body>
Reports <code>while</code> loops that iterate
over collections and can be replaced with enhanced <code>for</code> loops (foreach iteration syntax).
<!--  'foreach' still used in this description so that the inspection continues to be found using this keyword -->
<p><b>Example:</b></p>
<pre><code>
  Iterator it = c.iterator();
  while(it.hasNext()) {
    Object obj = it.next();
    System.out.println(obj);
  }
</code></pre>
<p>Can be replaced with:</p>
<pre><code>
  for (Object obj : c) {
    System.out.println(obj);
  }
</code></pre>
<!-- tooltip end -->
</body>
</html>